<template>



      <a-col :span="24">
        <div class="card-title">{{diseaseCode}}-1 急诊评估</div>
      </a-col>
        <a-col :span="span23.includes(disease.submitName)?24:12" v-for="disease in main1List">
          <div  v-if="disease.submitName=='ICH-1-1-1'" class="card-page">医师接诊时间：</div>
          <div  v-if="disease.submitName=='ICH-1-2-1'"  class="card-page">发病 24 小时内到院急诊首次用Glasgow昏迷量表，或者神经功能缺损NIHSS评估评估病情：</div>
          <div  v-if="disease.submitName=='ICH-1-3-1'" class="card-page">急诊首次头部影像学检查：</div>
          <div  v-if="disease.submitName=='ICH-1-4-1'" class="card-page">急诊入住”ICU/卒中中心：</div>
          <a-form-item v-if="disease.useType=='date'&&(disease.parentName == null ||form1[disease.parentName]==disease.parentValue)" :label="disease.title" :name="disease.submitName">
            <a-date-picker  v-model:value="disease.defaltValue"
                            :format="disease.rule"
                            :valueFormat="disease.rule"
                            @change="dateInput($event,disease.submitName)"
                            :show-time="disease.rule.length>10 "
                            style="width: 100%;"
            />
          </a-form-item>
          <a-form-item v-if="disease.useType=='number'&&!disease.submitName.startsWith('ICH-1-3')&&(disease.parentName == null ||form1[disease.parentName]==disease.parentValue)" :label="disease.title" :name="disease.submitName">
            <a-input-number  v-model:value="disease.defaltValue"  @change="numberInput($event,disease.submitName)"  allow-clear  style="width: 100%;"/>
            
          </a-form-item>
          <a-form-item v-if="disease.useType=='radio'&&(disease.parentName == null ||form1[disease.parentName]==disease.parentValue)" :label="disease.title" :name="disease.submitName">
            <a-radio-group v-model:value="disease.defaltValue">
              <a-radio
                  v-for="dict in disease.dictList"
                  :key="dict.dictCode"
                  :value="dict.dictCode"
                  @change="changeRadio($event,disease.submitName)"
              >
                {{ dict.dictName }}
              </a-radio>
            </a-radio-group>
            
          </a-form-item>
          <a-form-item v-if="disease.useType=='checkbox'&&!disease.submitName.startsWith('ICH-1-3')&&(disease.parentName == null ||form1[disease.parentName]!=null&&form1[disease.parentName].includes(disease.parentValue))" :label="disease.title" :name="disease.submitName">
            <a-checkbox-group v-model:value="disease.defaultValue"   @change="checkSave($event,disease.submitName)"  >
              <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                          v-for="dict in disease.dictList"
                          :key="dict.dictCode">{{
                  dict.dictName
                }}</a-checkbox>
            </a-checkbox-group>
            
          </a-form-item>
          <a-col span="24" v-if="form1['ICH-1-3-1']=='y'">
            <a-form-item v-if="disease.useType=='select'" :label="disease.title" :name="disease.submitName">
              <a-select
                  v-model:value="disease.defaltValue"
                  placeholder="请选择属性类型" allow-clear
                   @change="changeSelect($event,disease.submitName)"

              >
                <a-select-option
                    v-for="dict in disease.dictList"
                    :key="dict.dictCode"
                    :value="dict.dictCode"

                >
                  {{ dict.dictName }}
                </a-select-option>
              </a-select>
              
            </a-form-item>

            <a-form-item v-if="disease.useType=='checkbox'
            &&disease.submitName.startsWith('ICH-1-3')&&(disease.parentName == null ||form1[disease.parentName]!=null&&form1[disease.parentName].includes(disease.parentValue))" :label="disease.title" :name="disease.submitName">
              <a-checkbox-group v-model:value="disease.defaultValue"   @change="checkSave($event,disease.submitName)"  >
                <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                            v-for="dict in disease.dictList"
                            :key="dict.dictCode">{{
                    dict.dictName
                  }}</a-checkbox>
              </a-checkbox-group>
              
            </a-form-item>
            <a-form-item v-if="disease.useType=='number'&&disease.submitName.startsWith('ICH-1-3')&&(disease.parentName == null ||form1[disease.parentName]!=null&&form1[disease.parentName].includes(disease.parentValue))" :label="disease.title" :name="disease.submitName">
              <a-input-number  v-model:value="disease.defaltValue"  @change="numberInput($event,disease.submitName)"  allow-clear  style="width: 100%;"/>
              
            </a-form-item>
          </a-col>
        </a-col>


      <a-col :span="24">
        <div class="card-title">{{diseaseCode}}-2 急性脑出血患者入院24小时内的血压管理</div>
        <a-col :span="span23.includes(disease.submitName)?24:12" v-for="disease in main2List">
          <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='ICH-2-1-1'" :label="disease.title" :name="disease.submitName">
            <a-radio-group v-model:value="disease.defaltValue">
              <a-radio
                  v-for="dict in disease.dictList"
                  :key="dict.dictCode"
                  :value="dict.dictCode"
                  @change="changeRadio($event,disease.submitName)"
              >
                {{ dict.dictName }}
              </a-radio>
            </a-radio-group>
            
          </a-form-item>
          <a-col span="24" v-if="form1['ICH-2-1-1']=='y'">
            <a-form-item v-if="disease.useType=='select'
            &&(disease.submitName=='ICH-2-2-1')" :label="disease.title" :name="disease.submitName">
              <a-select
                  v-model:value="disease.defaltValue"
                  placeholder="请选择属性类型" allow-clear
                   @change="changeSelect($event,disease.submitName)"

              >
                <a-select-option
                    v-for="dict in disease.dictList"
                    :key="dict.dictCode"
                    :value="dict.dictCode"

                >
                  {{ dict.dictName }}
                </a-select-option>
              </a-select>
              
            </a-form-item>

          <a-col span="24" v-if="form1['ICH-2-2-1']=='a' || form1['ICH-2-2-1']=='c'">
            <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='ICH-2-1-2'" :label="disease.title" :name="disease.submitName">
              <a-radio-group v-model:value="disease.defaltValue">
                <a-radio
                    v-for="dict in disease.dictList"
                    :key="dict.dictCode"
                    :value="dict.dictCode"
                    @change="changeRadio($event,disease.submitName)"
                >
                  {{ dict.dictName }}
                </a-radio>
              </a-radio-group>
              
            </a-form-item>
            <a-form-item v-if="disease.useType=='checkbox'" :label="disease.title" :name="disease.submitName">
              <a-checkbox-group v-model:value="disease.defaultValue"   @change="checkSave($event,disease.submitName)"  >
                <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                            v-for="dict in disease.dictList"
                            :key="dict.dictCode">{{
                    dict.dictName
                  }}</a-checkbox>
              </a-checkbox-group>
              
            </a-form-item>
            <a-form-item v-if="disease.submitName=='ICH-2-1-3-1'&&form1['ICH-2-1-3']!=null&&form1['ICH-2-1-3'].includes('oth')" :label="disease.title" :name="disease.submitName">
              <a-input  v-model:value="disease.defaltValue"  @change="changeinput($event,disease.submitName)" allow-clear  />
              
            </a-form-item>
        </a-col>
          <a-col span="24" v-if="form1['ICH-2-2-1']=='b' ">
           <a-form-item v-if="disease.useType=='radio'&&['ICH-2-2-2','ICH-2-1-5'].includes(disease.submitName)" :label="disease.title" :name="disease.submitName">
              <a-radio-group v-model:value="disease.defaltValue">
                <a-radio
                    v-for="dict in disease.dictList"
                    :key="dict.dictCode"
                    :value="dict.dictCode"
                    @change="changeRadio($event,disease.submitName)"
                >
                  {{ dict.dictName }}
                </a-radio>
              </a-radio-group>
              
            </a-form-item>
            <a-form-item v-if="disease.useType=='select'
            &&(disease.submitName=='ICH-2-1-6'&&form1['ICH-2-1-5']=='y') " :label="disease.title" :name="disease.submitName">
              <a-select
                  v-model:value="disease.defaltValue"
                  placeholder="请选择属性类型" allow-clear
                   @change="changeSelect($event,disease.submitName)"
              >
                <a-select-option
                    v-for="dict in disease.dictList"
                    :key="dict.dictCode"
                    :value="dict.dictCode"

                >
                  {{ dict.dictName }}
                </a-select-option>
              </a-select>
              
            </a-form-item>
            <a-form-item v-if="disease.submitName=='ICH-2-1-6-1'&&form1['ICH-2-1-5']=='y'&&form1['ICH-2-1-6']=='oth'" :label="disease.title" :name="disease.submitName">
              <a-input  v-model:value="disease.defaltValue"  @change="changeinput($event,disease.submitName)" allow-clear  />
            </a-form-item>
          </a-col>
     </a-col>
        </a-col>
      </a-col>
     <a-col   :span="24">
      <div class="card-title">{{diseaseCode}}-3 急性脑出血患者预防深静脉血栓</div>
      <div class="card-page">入院后病情判定：</div>
      <a-col :span="24" v-for="disease in main3List">

        <a-form-item v-if="disease.useType=='select' " :label="disease.title" :name="disease.submitName">
          <a-select
              v-model:value="disease.defaltValue"
              placeholder="请选择属性类型" allow-clear
               @change="changeSelect($event,disease.submitName)"
          >
            <a-select-option
                v-for="dict in disease.dictList"
                :key="dict.dictCode"
                :value="dict.dictCode"
            >
              {{ dict.dictName }}
            </a-select-option>
          </a-select>
          
        </a-form-item>
      <a-col span="24" v-if="form1['ICH-3-1-1']=='d'||form1['ICH-3-1-1']=='g'">
        <div v-if="disease.submitName=='ICH-3-2-1'" class="card-page">预防DVT治疗医嘱日期与时间：
        </div>

        <a-form-item v-if="disease.useType=='radio'" :label="disease.title" :name="disease.submitName">
          <a-radio-group v-model:value="disease.defaltValue">
            <a-radio
                v-for="dict in disease.dictList"
                :key="dict.dictCode"
                :value="dict.dictCode"
                @change="changeRadio($event,disease.submitName)"
            >
              {{ dict.dictName }}
            </a-radio>
          </a-radio-group>
          
        </a-form-item>
        <a-col span="24" v-if="form1['ICH-3-2-1']=='y'">
          <div v-if="disease.submitName=='ICH-3-3-1'" class="card-page">预防DVT治疗医嘱日期与时间：
          </div>
          <a-form-item v-if="disease.useType=='checkbox'" :label="disease.title" :name="disease.submitName">
            <a-checkbox-group v-model:value="disease.defaultValue"   @change="checkSave($event,disease.submitName)"  >
              <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                          v-for="dict in disease.dictList"
                          :key="dict.dictCode">{{
                  dict.dictName
                }}</a-checkbox>
            </a-checkbox-group>
            
          </a-form-item>
          <a-form-item v-if="disease.useType=='date'" :label="disease.title" :name="disease.submitName">
            <a-date-picker  v-model:value="disease.defaltValue"
                            :format="disease.rule"
                            :valueFormat="disease.rule"
                            @change="dateInput($event,disease.submitName)"
                            :show-time="disease.rule.length>10 "
                            style="width: 100%;"
            />
          </a-form-item>
          <a-form-item v-if="disease.useType=='input'&&disease.submitName.startsWith('ICH-3-3')&&(form1[disease.parentName] != null &&form1[disease.parentName].includes(disease.parentValue))" :label="disease.title" :name="disease.submitName">
            <a-input-number  v-model:value="disease.defaltValue"  @change="numberInput($event,disease.submitName)"  allow-clear  style="width: 100%;"/>
            
          </a-form-item>

        </a-col>

      </a-col>
    </a-col>
  </a-col>
  <a-col :span="24">
    <div class="card-title">{{diseaseCode}}-4 入院时是否可以正常进食与饮水</div>
    <div class="card-page">入院时正常进食与饮水：</div>
    <a-col span="24" v-for="disease in main4List">
      <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='ICH-4-1-1'" :label="disease.title" :name="disease.submitName">
        <a-radio-group v-model:value="disease.defaltValue">
          <a-radio
              v-for="dict in disease.dictList"
              :key="dict.dictCode"
              :value="dict.dictCode"
              @change="changeRadio($event,disease.submitName)"
          >
            {{ dict.dictName }}
          </a-radio>
        </a-radio-group>
        
      </a-form-item>
      <a-col span="24" v-if="form1['ICH-4-1-1']=='n'">

        <div v-if="disease.submitName=='ICH-4-2-1'" class="card-page">入院24小时内进行首次吞咽困难评估时间：
        </div>
        <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='ICH-4-2-1'" :label="disease.title" :name="disease.submitName">
          <a-radio-group v-model:value="disease.defaltValue">
            <a-radio
                v-for="dict in disease.dictList"
                :key="dict.dictCode"
                :value="dict.dictCode"
                @change="changeRadio($event,disease.submitName)"
            >
              {{ dict.dictName }}
            </a-radio>
          </a-radio-group>
          
        </a-form-item>
        <a-col span="24" v-if="form1['ICH-4-2-1']=='y'">
          <div v-if="disease.submitName=='ICH-4-3-1'" class="card-page">评价方法选择：</div>
          <a-form-item v-if="disease.useType=='select'
            &&disease.submitName=='ICH-4-3-1'" :label="disease.title" :name="disease.submitName">
            <a-select
                v-model:value="disease.defaltValue"
                placeholder="请选择属性类型" allow-clear
                 @change="changeSelect($event,disease.submitName)"

            >
              <a-select-option
                  v-for="dict in disease.dictList"
                  :key="dict.dictCode"
                  :value="dict.dictCode"

              >
                {{ dict.dictName }}
              </a-select-option>
            </a-select>
            
          </a-form-item>
          <a-form-item v-if="disease.useType=='input'&&(
              (form1['ICH-4-3-1']=='oth'&&disease.submitName=='ICH-4-3-1-1') )" :label="disease.title" :name="disease.submitName">
            <a-input  v-model:value="disease.defaltValue"  @change="changeinput($event,disease.submitName)" allow-clear  />
            
          </a-form-item>
          <a-form-item v-if="disease.useType=='date'" :label="disease.title" :name="disease.submitName">
            <a-date-picker  v-model:value="disease.defaltValue"
                            :format="disease.rule"
                            :valueFormat="disease.rule"
                            @change="dateInput($event,disease.submitName)"
                            :show-time="disease.rule.length>10 "
                            style="width: 100%;"
            />
          </a-form-item>
        </a-col>
        <a-col span="24" v-if="form1['ICH-4-2-1']=='n'">
          <a-form-item v-if="disease.useType=='select'
            &&disease.submitName=='ICH-4-3-2'" :label="disease.title" :name="disease.submitName">
            <a-select
                v-model:value="disease.defaltValue"
                placeholder="请选择属性类型" allow-clear
                 @change="changeSelect($event,disease.submitName)"

            >
              <a-select-option
                  v-for="dict in disease.dictList"
                  :key="dict.dictCode"
                  :value="dict.dictCode"

              >
                {{ dict.dictName }}
              </a-select-option>
            </a-select>
            
          </a-form-item>
          <a-form-item v-if="disease.useType=='input'&&(
              (form1['ICH-4-3-2']=='oth'&&disease.submitName=='ICH-4-3-2-1') )" :label="disease.title" :name="disease.submitName">
            <a-input  v-model:value="disease.defaltValue"  @change="changeinput($event,disease.submitName)" allow-clear  />
            
          </a-form-item>
        </a-col>
      </a-col>
    </a-col>
  </a-col>

  <a-col :span="24">
    <div class="card-title">{{diseaseCode}}-5  急性出血性卒中患者住院期间接受影像学检测 </div>
    <div class="card-page">住院48小时内接受影像学检测复查： </div>
  </a-col>

  <a-col :span="span23.includes(disease.submitName)?24:12" v-for="disease in main5List">

      <div v-if="disease.submitName=='ICH-5-2-1'" class="card-page">影像学检查确定血肿部位与血肿量：</div>
    <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='ICH-5-1-1'" :label="disease.title" :name="disease.submitName">
      <a-radio-group v-model:value="disease.defaltValue">
        <a-radio
            v-for="dict in disease.dictList"
            :key="dict.dictCode"
            :value="dict.dictCode"
            @change="changeinput($event,disease.submitName)"
        >
          {{ dict.dictName }}
        </a-radio>
      </a-radio-group>
      
    </a-form-item>

    <a-form-item v-if="disease.useType=='checkbox'&&(disease.parentName == null ||(form1[disease.parentName]!=null&&form1[disease.parentName].includes(disease.parentValue)))" :label="disease.title" :name="disease.submitName">
      <a-checkbox-group v-model:value="disease.defaultValue" @change="checkSave($event,disease.submitName)" >
        <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                    v-for="dict in disease.dictList"
                    :key="dict.dictCode">{{
            dict.dictName
          }}</a-checkbox>
      </a-checkbox-group>
      
    </a-form-item>
    <a-form-item v-if="disease.useType=='number'&&(
        disease.parentName == null ||(form1[disease.parentName]!=null&&form1[disease.parentName].includes(disease.parentValue)))
        &&(disease.parentName=='ICH-5-2-1'
        ||(disease.parentName=='ICH-5-2-2-1'&&form1['ICH-5-2-1']!=null&&form1['ICH-5-2-1'].includes('a'))
        ||(disease.parentName=='ICH-5-2-2-5'&&form1['ICH-5-2-1']!=null&&form1['ICH-5-2-1'].includes('c'))
         ||(disease.parentName=='ICH-5-2-2-10'&&form1['ICH-5-2-1']!=null&&form1['ICH-5-2-1'].includes('d')))" :label="disease.title" :name="disease.submitName">
      <a-input-number  v-model:value="disease.defaltValue"  @change="numberInput($event,disease.submitName)"  allow-clear  style="width: 100%;"/>
    </a-form-item>
    <a-col span="24" v-if="form1['ICH-5-1-1']=='y'">
      <a-form-item v-if="disease.useType=='select'
            &&disease.submitName=='ICH-5-1-2'" :label="disease.title" :name="disease.submitName">
        <a-select
            v-model:value="disease.defaltValue"
            placeholder="请选择属性类型" allow-clear
             @change="changeSelect($event,disease.submitName)"
        >
          <a-select-option
              v-for="dict in disease.dictList"
              :key="dict.dictCode"
              :value="dict.dictCode"
          >
            {{ dict.dictName }}
          </a-select-option>
        </a-select>
      </a-form-item>
      <a-form-item v-if="disease.useType=='input'&&  form1['ICH-5-1-2']=='oth'" :label="disease.title" :name="disease.submitName">
        <a-input  v-model:value="disease.defaltValue"  @change="changeinput($event,disease.submitName)" allow-clear  />
      </a-form-item>

      <a-form-item v-if="disease.useType=='date'" :label="disease.title" :name="disease.submitName">
        <a-date-picker  v-model:value="disease.defaltValue"
                        :format="disease.rule"
                        :valueFormat="disease.rule"
                        @change="dateInput($event,disease.submitName)"
                        :show-time="disease.rule.length>10 "
                        style="width: 100%;"
        />
      </a-form-item>
      <a-form-item v-if="disease.useType=='radio'&&disease.submitName!='ICH-5-1-1'" :label="disease.title" :name="disease.submitName">
        <a-radio-group v-model:value="disease.defaltValue">
          <a-radio
              v-for="dict in disease.dictList"
              :key="dict.dictCode"
              :value="dict.dictCode"
              @change="changeinput($event,disease.submitName)"
          >
            {{ dict.dictName }}
          </a-radio>
        </a-radio-group>
        
      </a-form-item>

    </a-col>
  </a-col>
  <a-col :span="24">
    <div class="card-title">{{diseaseCode}}-6 重症急性期出血性卒中患者接受神经外科评估及干预
    </div>
    <div class="card-page">手术前评价严重程度ICH评分：
    </div>
  </a-col>
  <a-col :span="24" v-for="disease in mai6List">


    <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='ICH-6-1-1'" :label="disease.title" :name="disease.submitName">
      <a-radio-group v-model:value="disease.defaltValue">
        <a-radio
            v-for="dict in disease.dictList"
            :key="dict.dictCode"
            :value="dict.dictCode"
            @change="changeinput($event,disease.submitName)"
        >
          {{ dict.dictName }}
        </a-radio>
      </a-radio-group>
      
    </a-form-item>
    <a-col span="24" v-if="form1['ICH-6-1-1']=='y'">
      <div v-if="disease.submitName=='ICH-6-2-6'" class="card-page"> 重症急性期脑出血患者接受神经外科干预措施：
      </div>

      <a-form-item v-if="disease.useType=='date'&&disease.parentName=='ICH-6-1-1'" :label="disease.title" :name="disease.submitName">
        <a-date-picker  v-model:value="disease.defaltValue"
                        :format="disease.rule"
                        :valueFormat="disease.rule"
                        @change="dateInput($event,disease.submitName)"
                        :show-time="disease.rule.length>10 "
                        style="width: 100%;"
        />
      </a-form-item>
      <a-form-item v-if="disease.useType=='select'&&disease.parentName=='ICH-6-1-1'" :label="disease.title" :name="disease.submitName">
        <a-select
            v-model:value="disease.defaltValue"
            placeholder="请选择属性类型" allow-clear
             @change="changeSelect($event,disease.submitName)"
        >
          <a-select-option
              v-for="dict in disease.dictList"
              :key="dict.dictCode"
              :value="dict.dictCode"
          >
            {{ dict.dictName }}
          </a-select-option>
        </a-select>

      </a-form-item>
      <a-form-item v-if="disease.useType=='select'&&disease.parentName=='ICH-6-1-5'&&form1['CM-0-1-4-1']!=null" :label="disease.title" :name="disease.submitName">
        <a-select
            v-model:value="disease.defaltValue"
            placeholder="请选择属性类型" allow-clear
             @change="changeSelect($event,disease.submitName)"
        >
          <a-select-option
              v-for="dict in disease.dictList"
              :key="dict.dictCode"
              :value="dict.dictCode"
          >
            {{ dict.dictName }}
          </a-select-option>
        </a-select>

      </a-form-item>
      <a-form-item v-if="disease.useType=='radio'&&disease.parentName=='ICH-6-1-1'" :label="disease.title" :name="disease.submitName">
        <a-radio-group v-model:value="disease.defaltValue">
          <a-radio
              v-for="dict in disease.dictList"
              :key="dict.dictCode"
              :value="dict.dictCode"
              @change="changeinput($event,disease.submitName)"
          >
            {{ dict.dictName }}
          </a-radio>
        </a-radio-group>
      </a-form-item>
      <a-form-item v-if="disease.useType=='number'&&disease.parentName=='ICH-6-1-1'" :label="disease.title" :name="disease.submitName">
        <a-input-number  v-model:value="disease.defaltValue"  @change="numberInput($event,disease.submitName)"  allow-clear  style="width: 100%;"/>
      </a-form-item>
      <a-col span="24" v-if="form1['ICH-6-2-6']=='y'">
        <a-form-item v-if="disease.useType=='select'&&disease.parentName=='ICH-6-2-6'
        &&(form1['ICH-6-1-5']==null || !form1['ICH-6-1-5'].includes('UTD'))" :label="disease.title" :name="disease.submitName">
          <a-select
              v-model:value="disease.defaltValue"
              placeholder="请选择属性类型" allow-clear
               @change="changeSelect($event,disease.submitName)"
          >
            <a-select-option
                v-for="dict in disease.dictList"
                :key="dict.dictCode"
                :value="dict.dictCode"
            >
              {{ dict.dictName }}
            </a-select-option>
          </a-select>

        </a-form-item>
        <a-form-item v-if="disease.useType=='date'&&disease.parentName=='ICH-6-2-6'" :label="disease.title" :name="disease.submitName">
          <a-date-picker  v-model:value="disease.defaltValue"
                          :format="disease.rule"
                          :valueFormat="disease.rule"
                          @change="dateInput($event,disease.submitName)"
                          :show-time="disease.rule.length>10 "
                          style="width: 100%;"
          />
        </a-form-item>
        <a-form-item v-if="disease.useType=='checkbox'&&disease.parentName=='ICH-6-2-6'&&form1['CM-0-1-4-1']!=null" :label="disease.title" :name="disease.submitName">
          <a-checkbox-group v-model:value="disease.defaultValue" @change="checkSave($event,disease.submitName)" >
            <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                        v-for="dict in disease.dictList"
                        :key="dict.dictCode">{{
                dict.dictName
              }}</a-checkbox>
          </a-checkbox-group>
        </a-form-item>
        <a-form-item v-if="disease.useType=='input'&&(
              (form1['ICH-6-1-5']!=null&&form1['ICH-6-1-5'].includes('oth')&&disease.submitName=='ICH-6-1-5-1')
             || (form1['ICH-6-2-3']=='oth'&&disease.submitName=='ICH-6-2-3-1'))" :label="disease.title" :name="disease.submitName">
          <a-input  v-model:value="disease.defaltValue"  @change="changeinput($event,disease.submitName)" allow-clear  />
        </a-form-item>
        <a-col span="24" v-if="form1['ICH-6-1-5']==null || !form1['ICH-6-1-5'].includes('UTD')">
          <a-form-item v-if="disease.useType=='checkbox'&&form1['CM-0-1-4-1']!=null&&disease.submitName.startsWith('ICH-6-2')&&(disease.submitName=='ICH-6-2-8'||(form1[disease.parentName]!=null&&form1[disease.parentName].includes(disease.parentValue)))" :label="disease.title" :name="disease.submitName">
            <a-checkbox-group v-model:value="disease.defaultValue" @change="checkSave($event,disease.submitName)" >
              <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                          v-for="dict in disease.dictList"
                          :key="dict.dictCode">{{
                  dict.dictName
                }}</a-checkbox>
            </a-checkbox-group>
          </a-form-item>
          <a-form-item v-if="disease.useType=='number'&&(
        disease.parentName == null ||(form1[disease.parentName]!=null&&form1[disease.parentName].includes(disease.parentValue)))
        &&(disease.parentName=='ICH-6-2-8'
        ||(disease.parentName=='ICH-6-2-9-1'&&form1['ICH-6-2-9-1']!=null&&form1['ICH-6-2-8'].includes('a'))
        ||(disease.parentName=='ICH-6-2-9-5'&&form1['ICH-6-2-9-5']!=null&&form1['ICH-6-2-8'].includes('c'))
         ||(disease.parentName=='ICH-6-2-9-10'&&form1['ICH-6-2-9-10']!=null&&form1['ICH-6-2-8'].includes('d')))" :label="disease.title" :name="disease.submitName">
            <a-input-number  v-model:value="disease.defaltValue"  @change="numberInput($event,disease.submitName)"  allow-clear  style="width: 100%;"/>
          </a-form-item>
        </a-col>
        <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='CM-2-1'" :label="disease.title" :name="disease.submitName">
          <a-radio-group v-model:value="disease.defaltValue">
            <a-radio
                v-for="dict in disease.dictList"
                :key="dict.dictCode"
                :value="dict.dictCode"
                @change="changeinput($event,disease.submitName)"
            >
              {{ dict.dictName }}
            </a-radio>
          </a-radio-group>
        </a-form-item>
      </a-col>

    </a-col>
  </a-col>
  <a-col  :span="24" v-if="form1['ICH-6-2-6']=='y'&&form1['CM-0-1-4-1']!=null&&(form1['ICH-6-1-5']==null || !form1['ICH-6-1-5'].includes('UTD'))">
  <a-col :span="24" v-for="disease in cm2List">
    <div v-if="disease.submitName=='CM-2-1'
      " class="card-page"> 手术后并发症：
    </div>
    <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='CM-2-1'" :label="disease.title" :name="disease.submitName">
      <a-radio-group v-model:value="disease.defaltValue">
        <a-radio
            v-for="dict in disease.dictList"
            :key="dict.dictCode"
            :value="dict.dictCode"
            @change="changeinput($event,disease.submitName)"
        >
          {{ dict.dictName }}
        </a-radio>
      </a-radio-group>

    </a-form-item>
    <a-col span="24" v-if="form1['CM-2-1']=='y'">
      <a-form-item v-if="disease.useType=='checkbox'" :label="disease.title" :name="disease.submitName">
        <a-checkbox-group v-model:value="disease.defaultValue" @change="checkSave($event,disease.submitName)" >
          <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                      v-for="dict in disease.dictList"
                      :key="dict.dictCode">{{
              dict.dictName
            }}</a-checkbox>
        </a-checkbox-group>
      </a-form-item>
      <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='ICH-6-2-5'" :label="disease.title" :name="disease.submitName">
        <a-radio-group v-model:value="disease.defaltValue">
          <a-radio
              v-for="dict in disease.dictList"
              :key="dict.dictCode"
              :value="dict.dictCode"
              @change="changeinput($event,disease.submitName)"
          >
            {{ dict.dictName }}
          </a-radio>
        </a-radio-group>

      </a-form-item>
      <a-form-item v-if="disease.useType=='input'&&(
              (form1[disease.parentName]!=null&&form1[disease.parentName].includes(disease.parentValue))
            )" :label="disease.title" :name="disease.submitName">
        <a-input  v-model:value="disease.defaltValue"  @change="changeinput($event,disease.submitName)" allow-clear  />
      </a-form-item>
      <a-form-item v-if="disease.useType=='select'&&(
              form1[disease.parentName]!=null&&form1[disease.parentName].includes(disease.parentValue))" :label="disease.title" :name="disease.submitName">
        <a-select
            v-model:value="disease.defaltValue"
            placeholder="请选择属性类型" allow-clear
             @change="changeSelect($event,disease.submitName)"
        >
          <a-select-option
              v-for="dict in disease.dictList"
              :key="dict.dictCode"
              :value="dict.dictCode"
          >
            {{ dict.dictName }}
          </a-select-option>
        </a-select>

      </a-form-item>
    </a-col>
  </a-col>
  </a-col>
  <a-col  :span="24">
    <div class="card-title">{{diseaseCode}}-7 规范化血压控制的二级预防干预 </div>
  <a-col span="24" v-for="disease in mai7List">
    <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='ICH-7-1-1'" :label="disease.title" :name="disease.submitName">
      <a-radio-group v-model:value="disease.defaltValue">
        <a-radio
            v-for="dict in disease.dictList"
            :key="dict.dictCode"
            :value="dict.dictCode"
            @change="changeinput($event,disease.submitName)"
        >
          {{ dict.dictName }}
        </a-radio>
      </a-radio-group>
      
    </a-form-item>
    <a-col span="24" v-if="form1['ICH-7-1-1']=='y'">
      <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='ICH-7-1-2'" :label="disease.title" :name="disease.submitName">
        <a-radio-group v-model:value="disease.defaltValue">
          <a-radio
              v-for="dict in disease.dictList"
              :key="dict.dictCode"
              :value="dict.dictCode"
              @change="changeinput($event,disease.submitName)"
          >
            {{ dict.dictName }}
          </a-radio>
        </a-radio-group>

      </a-form-item>
      <a-form-item v-if="disease.useType=='input'&&form1[disease.parentName]!=null&&form1[disease.parentName].includes(disease.parentValue)" :label="disease.title" :name="disease.submitName">
        <a-input  v-model:value="disease.defaltValue"  @change="changeinput($event,disease.submitName)" allow-clear  />
      </a-form-item>
      <a-form-item v-if="disease.useType=='checkbox'&&form1[disease.parentName]==disease.parentValue" :label="disease.title" :name="disease.submitName">
        <a-checkbox-group v-model:value="disease.defaultValue" @change="checkSave($event,disease.submitName)" >
          <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                      v-for="dict in disease.dictList"
                      :key="dict.dictCode">{{
              dict.dictName
            }}</a-checkbox>
        </a-checkbox-group>
      </a-form-item>
    </a-col>

  </a-col>
  </a-col>
  <a-col  :span="24">
    <div class="card-title">{{diseaseCode}}-8 急性脑出血卒中患者病因诊断及并发症 </div>
    <a-col span="24" v-for="disease in mai8List">
      <div v-if="disease.submitName=='ICH-8-1-1'" class="card-page">急性脑出血卒中患者病因诊断： </div>
      <div v-if="disease.submitName=='ICH-8-2-1'" class="card-page">住院期间并发症： </div>
      <a-form-item v-if="disease.useType=='radio'" :label="disease.title" :name="disease.submitName">
        <a-radio-group v-model:value="disease.defaltValue">
          <a-radio
              v-for="dict in disease.dictList"
              :key="dict.dictCode"
              :value="dict.dictCode"
              @change="changeinput($event,disease.submitName)"
          >
            {{ dict.dictName }}
          </a-radio>
        </a-radio-group>

      </a-form-item>
      <a-form-item v-if="disease.useType=='select'&&(disease.parentName==null||(disease.parentName!=null&&form1[disease.parentName]==disease.parentValue))" :label="disease.title" :name="disease.submitName">
        <a-select
            v-model:value="disease.defaltValue"
            placeholder="请选择属性类型" allow-clear
             @change="changeSelect($event,disease.submitName)"
        >
          <a-select-option
              v-for="dict in disease.dictList"
              :key="dict.dictCode"
              :value="dict.dictCode"
          >
            {{ dict.dictName }}
          </a-select-option>
        </a-select>

      </a-form-item>
      <a-form-item v-if="disease.useType=='checkbox'&&form1[disease.parentName]!=null&&form1[disease.parentName]==disease.parentValue" :label="disease.title" :name="disease.submitName">
        <a-checkbox-group v-model:value="disease.defaultValue" @change="checkSave($event,disease.submitName)" >
          <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                      v-for="dict in disease.dictList"
                      :key="dict.dictCode">{{
              dict.dictName
            }}</a-checkbox>
        </a-checkbox-group>
      </a-form-item>
      <a-form-item v-if="disease.useType=='input'&&form1[disease.parentName]!=null&&form1[disease.parentName].includes(disease.parentValue)" :label="disease.title" :name="disease.submitName">
        <a-input  v-model:value="disease.defaltValue"  @change="changeinput($event,disease.submitName)" allow-clear  />
      </a-form-item>

    </a-col>
  </a-col>
  <a-col :span="24">
    <div class="card-title">{{diseaseCode}}-9 住院期间为患者提供健康教育与出院时提供教育告知五要素</div>
  </a-col>
  <a-col :span="24" v-for="disease in mai9List">
    <div v-if="disease.submitName=='ICH-9-1-1'&&form1['CM-4-3']!='e'" class="card-page">卒中重点护理评估和健康教育：</div>
    <div v-if="disease.submitName=='ICH-9-2-2'&&form1['CM-4-3']!='e'" class="card-page">出院时风险Essen/ICH评估与出院时功能恢复结局mRS评估：</div>

    <div v-if="disease.submitName=='ICH-9-2-2-1'" class="card-page">出院时提供教育告知五要素情况：</div>
    <a-form-item v-if="['ICH-9-1-1'].includes(disease.submitName)" :label="disease.title" :name="disease.submitName">
      <a-radio-group v-model:value="disease.defaltValue" @change="changeinput($event,disease.submitName)">
        <a-radio
            v-for="dict in disease.dictList"
            :key="dict.dictCode"
            :value="dict.dictCode"
        >
          {{ dict.dictName }}
        </a-radio>
      </a-radio-group>
    </a-form-item>
    <a-form-item v-if="['ICH-9-2-2','ICH-9-2-5'].includes(disease.submitName)&&form1['CM-4-3']!='e'" :label="disease.title" :name="disease.submitName">
      <a-radio-group v-model:value="disease.defaltValue" @change="changeinput($event,disease.submitName)">
        <a-radio
            v-for="dict in disease.dictList"
            :key="dict.dictCode"
            :value="dict.dictCode"
        >
          {{ dict.dictName }}
        </a-radio>
      </a-radio-group>
    </a-form-item>
    <a-col span="24" v-if="form1['ICH-9-1-1']=='y'">
      <a-form-item v-if="disease.useType=='select'&&disease.submitName.startsWith('ICH-9-1')
                   &&form1[disease.parentName]!=null&&form1[disease.parentName]==disease.parentValue" :label="disease.title" :name="disease.submitName">
        <a-select
            v-model:value="disease.defaltValue"
            placeholder="请选择属性类型" allow-clear
             @change="changeSelect($event,disease.submitName)"
        >
          <a-select-option
              v-for="dict in disease.dictList"
              :key="dict.dictCode"
              :value="dict.dictCode"
          >
            {{ dict.dictName }}
          </a-select-option>
        </a-select>

      </a-form-item>
      <a-form-item v-if="disease.useType=='radio'&&disease.submitName.startsWith('ICH-9-1')
                   &&form1[disease.parentName]!=null&&form1[disease.parentName]==disease.parentValue" :label="disease.title" :name="disease.submitName">
        <a-radio-group v-model:value="disease.defaltValue" @change="changeinput($event,disease.submitName)">
          <a-radio
              v-for="dict in disease.dictList"
              :key="dict.dictCode"
              :value="dict.dictCode"
          >
            {{ dict.dictName }}
          </a-radio>
        </a-radio-group>
      </a-form-item>
      <a-form-item v-if="disease.useType=='checkbox'&&disease.submitName.startsWith('ICH-9-1')
                        &&form1[disease.parentName]!=null&&form1[disease.parentName]==disease.parentValue" :label="disease.title" :name="disease.submitName">
        <a-checkbox-group v-model:value="disease.defaultValue"   @change="checkSave($event,disease.submitName)" >
          <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                      v-for="dict in disease.dictList" :key="dict.dictCode">{{
              dict.dictName
            }}</a-checkbox>
        </a-checkbox-group>

      </a-form-item>
      <a-form-item v-if="disease.useType=='number'&&disease.submitName.startsWith('ICH-9-1')
                       &&(form1[disease.parentName]==null||!form1[disease.parentName].includes('UTD'))" :label="disease.title" :name="disease.submitName">
        <a-input-number  v-model:value="disease.defaltValue"  @change="numberInput($event,disease.submitName)"  allow-clear  style="width: 100%;"/>
      </a-form-item>
      <a-form-item v-if="disease.submitName.startsWith('ICH-9-1-2-5-2')
                   &&['b','c','d','e'].includes(form1['ICH-9-1-2-5-1'])" :label="disease.title" :name="disease.submitName">
        <a-select
            v-model:value="disease.defaltValue"
            placeholder="请选择属性类型" allow-clear
             @change="changeSelect($event,disease.submitName)"
        >
          <a-select-option
              v-for="dict in disease.dictList"
              :key="dict.dictCode"
              :value="dict.dictCode"
          >
            {{ dict.dictName }}
          </a-select-option>
        </a-select>

      </a-form-item>

    </a-col>
    <a-col span="24" v-if="form1['CM-4-3']!=='e'">
      <a-form-item v-if="disease.useType=='number'&&disease.submitName.startsWith('ICH-9-2')
                       &&(form1[disease.parentName]!==null&&form1[disease.parentName]==disease.parentValue)
                       &&((form1['ICH-9-2-2']==='y'&&disease.submitName==='ICH-9-2-1-3')||(form1['ICH-9-2-2']==='n'&&disease.submitName==='ICH-9-2-1-2'))" :label="disease.title" :name="disease.submitName">
        <a-input-number  v-model:value="disease.defaltValue"  @change="numberInput($event,disease.submitName)"  allow-clear  style="width: 100%;"/>
      </a-form-item>
      <a-form-item v-if="disease.useType==='checkbox'&&disease.submitName.startsWith('ICH-9-2-2')" :label="disease.title" :name="disease.submitName">
        <a-checkbox-group v-model:value="disease.defaultValue"   @change="checkSave($event,disease.submitName)"  >
          <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                      v-for="dict in disease.dictList"
                      :key="dict.dictCode">{{
              dict.dictName
            }}</a-checkbox>
        </a-checkbox-group>
      </a-form-item>
      <a-form-item v-if="disease.useType==='radio'&&disease.submitName.startsWith('ICH-9-2')
                   &&form1[disease.parentName]!=null&&form1[disease.parentName]===disease.parentValue" :label="disease.title" :name="disease.submitName">
        <a-radio-group v-model:value="disease.defaltValue" @change="changeinput($event,disease.submitName)">
          <a-radio
              v-for="dict in disease.dictList"
              :key="dict.dictCode"
              :value="dict.dictCode"
          >
            {{ dict.dictName }}
          </a-radio>
        </a-radio-group>
      </a-form-item>
      <a-form-item v-if="disease.useType=='select'&&disease.submitName.startsWith('ICH-9-2')
                   &&form1[disease.parentName]!=null&&form1[disease.parentName]==disease.parentValue
                    &&((form1['ICH-9-2-2']==='y'&&disease.submitName==='ICH-9-2-4-2')||(form1['ICH-9-2-2']==='n'&&disease.submitName==='ICH-9-2-3-2')||disease.submitName==='ICH-9-2-6')" :label="disease.title" :name="disease.submitName">
        <a-select
            v-model:value="disease.defaltValue"
            placeholder="请选择属性类型" allow-clear
             @change="changeSelect($event,disease.submitName)"
        >
          <a-select-option
              v-for="dict in disease.dictList"
              :key="dict.dictCode"
              :value="dict.dictCode"
          >
            {{ dict.dictName }}
          </a-select-option>
        </a-select>

      </a-form-item>

    </a-col>

  </a-col>
</template>

<script setup name="PatientIchForm">
import {ref, reactive, onMounted, watch} from 'vue';
import {message} from "ant-design-vue";


const main3List = ref([]);
const main4List = ref([]);
const main5List = ref([]);
const mai6List = ref([]);
const mai7List = ref([]);
const mai8List = ref([]);
const mai9List = ref([]);
const main2List = ref([]);
const main1List = ref([]);
const cm2List = ref([]);
const span23= ref([
   'ICH-1-1-1',
    'ICH-1-2-1',
    'ICH-1-2-4',
  'ICH-1-3-2',
  'ICH-1-3-3',
  'ICH-1-3-3-1',
  'ICH-1-3-3-5',
  'ICH-1-3-3-6',
  'ICH-1-3-3-2',
  'ICH-1-3-3-3',
  'ICH-1-3-3-7',
  'ICH-1-3-3-8',
  'ICH-1-3-3-9',
  'ICH-1-3-3-10',
  'ICH-1-3-3-4',
  'ICH-1-3-3-11',
  'ICH-1-3-3-12',
  'ICH-1-3-3-13',
  'ICH-1-3-3-14',
  'ICH-1-3-3-15',
  'ICH-1-3-3-16',
    'ICH-1-4-1',
  'ICH-1-4-2',
  'ICH-1-4-3',
  'ICH-2-1-2',
  'ICH-2-1-3',
  'ICH-2-1-3-1',
  'ICH-2-2-2',
  'ICH-2-1-5',
    'ICH-5-1-3',
    'ICH-5-1-1',
    'ICH-5-2-1',
    'ICH-5-2-2-1',
  'ICH-5-2-2-2',
  'ICH-5-2-2-3',
  'ICH-5-2-2-4',
  'ICH-5-2-2-5',
  'ICH-5-2-2-6',
  'ICH-5-2-2-7',
  'ICH-5-2-2-8',
  'ICH-5-2-2-9',
  'ICH-5-2-2-10',
  'ICH-5-2-2-11',
  'ICH-5-2-2-12',
  'ICH-5-2-2-13',
  'ICH-5-2-2-14',
  'ICH-5-2-2-15',
  'ICH-5-2-2-16',
]);
let rsm =  ref({
  "CS-1-1-1": false,
  "CS-1-2-5": false,
  "CM-1-1-1": false,
  "CS-5-1": false,
  "CS-5-3": false,
});
const props = defineProps({
// 表单数据
  diseaseList: Object,
  form1: Object,
  diseaseCode:String,
});
onMounted(async() => {
  console.log(JSON.stringify(props))
});
watch(
    () => props.diseaseList,
() => {
  console.log("---------------------=================================")
    for(let i = 0; i < props.diseaseList.length; i ++) {
     if(props.diseaseList[i].diseaseGroup==props.diseaseCode+"-2"){
        main2List.value.push(props.diseaseList[i])
      }else if(props.diseaseList[i].diseaseGroup==props.diseaseCode+"-1"){
        main1List.value.push(props.diseaseList[i])
      } else if(props.diseaseList[i].diseaseGroup==props.diseaseCode+"-3"){
        main3List.value.push(props.diseaseList[i])
      }else if(props.diseaseList[i].diseaseGroup==props.diseaseCode+"-4"){
        main4List.value.push(props.diseaseList[i])
      }else if(props.diseaseList[i].diseaseGroup==props.diseaseCode+"-5"){
       main5List.value.push(props.diseaseList[i])
     } else if(props.diseaseList[i].diseaseGroup==props.diseaseCode+"-6"){
       mai6List.value.push(props.diseaseList[i])
     }else if(props.diseaseList[i].diseaseGroup==props.diseaseCode+"-7"){
       mai7List.value.push(props.diseaseList[i])
     }else if(props.diseaseList[i].diseaseGroup==props.diseaseCode+"-8"){
       mai8List.value.push(props.diseaseList[i])
     }else if(props.diseaseList[i].diseaseGroup==props.diseaseCode+"-9"){
       mai9List.value.push(props.diseaseList[i])
     }
     else if(props.diseaseList[i].diseaseGroup=="CM-2"){
       cm2List.value.push(props.diseaseList[i])
     }
    }

}
);

const changeinput =  (el,data) => {
  props.form1[data] = el.target.value
}
const changeRadio =  (el,data) => {
  props.form1[data] = el.target.value
}
const checkSave=  (el,data) => {
  props.form1[data] = el
  console.log(el)
  if(el.length>1 && el.includes("UTD")){
    for(let i = 0; i < props.diseaseList.length; i ++) {
      if(props.diseaseList[i].submitName == data){
        props.diseaseList[i].defaultValue=["UTD"]
        props.form1[data] = ["UTD"]
      }
    }
    message.error("填报内容不符合规范，请重新填报");
  }
}


const changeSelect =  (value,data) => {
  if (typeof value === "undefined"){
    props.form1[data] = null
  }else {
    props.form1[data] = value
  }
}
const numberInput =  (el,data) => {
  props.form1[data] = el
}
const dateInput =  (el,data) => {
  props.form1[data] = el
}
const selectRsm = (el,rule,data) => {
  debugger
  props.form1[data] = el.target.value
  if (el.target.value == rule) {
    rsm.value[data] = true;
  } else {
    rsm.value[data] = false;
  }
};

</script>

<style scoped lang="less">
.card-title {
  width: 100%;
  border-left: 5px solid;
  border-color: var(--primary-color);
  color: var(--primary-color);
  font-size: large;
  font-weight: bold;
  padding-left: 2px;
  margin-bottom: 2px;
}
.card-page {
  width: 100%;
  font-weight: bold;
  color: #092b00;
  padding-left: 2px;
  margin-bottom: 2px;
}
.ant-form-item{
  border-bottom:1px solid var(--primary-color);
}
.line {
border-top: 1px solid #b2f1e8; /* 设置横线的样式，比如颜色和宽度 */
margin: 1px 0; /* 设置横线的上下外边距 */
padding-left: -100px!important;
}
</style>
